package cn.com.dingtek.genius.manager.server.repository.db.manager;

import cn.com.dingtek.genius.manager.server.repository.db.entity.UserLoginLog;
import cn.com.dingtek.genius.manager.server.repository.db.mapper.UserLoginLogMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.Date;

@Service
public class UserLoginLogManager extends ServiceImpl<UserLoginLogMapper, UserLoginLog> {

    public Collection<UserLoginLog> getByDate(Date min, Date max) {
        return list(Wrappers.<UserLoginLog>query().gt("ctime", min).lt("ctime", max));
    }
}
